import React from "react";
import BaseComponent from "../../../redare/components/BaseComponent";
import Zmage from "react-zmage";

export default class AvatarCol extends BaseComponent {

  constructor(props) {
    super(props);
  }

  render() {

    let {value} = this.props;

    let jsx;
    if (value) {
      jsx = (
        <div onClick={() => Zmage.browsing({src: value})}>
          <img className="cover" src={`${value.split(",")[0]}?scale=512x512`} alt=""/>
        </div>
      )
    } else {
      jsx = <div className="no-cover">暂无封面</div>;
    }

    return (
      <div className='coverCell'>{jsx}</div>
    )
  }
}